﻿/*******************************************************************************
 * Copyright © 2016 DJY 版权所有
 * Author: DJY
 * Description: 后台管理系统
 * Website：http://www.djyweb.cn
*********************************************************************************/
using DJY.Code;
using DJY.Domain.ViewModel;
using DJY.Service.SystemSecurity;
using System.Collections.Generic;
using System.Web.Mvc;

namespace DJY.Web.Controllers
{
    [HandlerLogin]
    public class HomeController : Controller
    {
        [HttpGet]
        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public ActionResult Default()
        {
            ViewBag.CompanyName = OperatorProvider.GetCurrent().CompanyName;
            return View();
        }

        /// <summary>
        /// 获取系统配置
        /// </summary>
        /// <param name="codes">字典代码</param>
        /// <returns></returns>
        [HttpPost]
        public JsonResult GetSysItems(List<string> codes)
        {
            return Json(OperatorProvider.Resolve<ISysService>().GetSysItems(codes));
        }
    }
}
